<template>
  <div class="home-container">
    <TopHeader />
    <BottomNavigation />
    <!-- 顶部banner区域 -->
    <div class="banner">
      <div class="banner-content">
        <h1 class="banner-title">便捷挂号，轻松就医</h1>
        <p class="banner-desc">告别排队等待，随时随地在线预约专家号，享受优质医疗服务</p>
        <div class="banner-btns">
          <button class="btn primary-btn">
            <span class="btn-icon"><i class="fa fa-calendar-plus-o"></i></span>
            <span class="btn-text">立即预约</span>
          </button>
          <button class="btn secondary-btn">
            <span class="btn-icon"><i class="fa fa-info-circle"></i></span>
            <span class="btn-text">了解更多</span>
          </button>
        </div>
      </div>
    </div>

    <!-- 步骤说明区域 -->
    <div class="steps-section">
      <h2 class="steps-title">简单四步，完成挂号</h2>
      <p class="steps-desc">我们简化了挂号流程，只需四个简单步骤，即可完成预约，节省您的宝贵时间</p>
      <div class="steps-list">
        <div class="step-item">
          <div class="step-icon">
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"></path>
              <path d="M16 6l2-2 5 5"></path>
              <path d="M2 6l2-2 5 5"></path>
            </svg>
          </div>
          <h3 class="step-title">选择科室</h3>
          <p class="step-desc">根据您的症状或需求，选择合适的科室和专科</p>
        </div>
        <div class="step-item">
          <div class="step-icon">
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <rect x="3" y="4" width="18" height="16" rx="2" ry="2"></rect>
              <line x1="16" y1="8" x2="8" y2="8"></line>
              <line x1="16" y1="16" x2="8" y2="16"></line>
            </svg>
          </div>
          <h3 class="step-title">选择日期</h3>
          <p class="step-desc">查看医生排班，选择您方便的就诊日期和时间段</p>
        </div>
        <div class="step-item">
          <div class="step-icon">
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <path d="M12 14l9-5-9-5-9 5 9 5"></path>
              <path d="M12 14l6.16-3.422a12.083 12.083 0 0 1 .665 6.479A11.952 11.952 0 0 0 12 20.055a11.952 11.952 0 0 0-6.824-2.998 12.078 12.078 0 0 1 .665-6.479L12 14z"></path>
              <path d="M12 14l9-5-9-5-9 5 9 5" opacity=".2"></path>
            </svg>
          </div>
          <h3 class="step-title">填写信息</h3>
          <p class="step-desc">填写就诊人信息，确认预约详情</p>
        </div>
        <div class="step-item">
          <div class="step-icon">
            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path>
              <polyline points="22 4 12 14.01 9 11.01"></polyline>
            </svg>
          </div>
          <h3 class="step-title">完成预约</h3>
          <p class="step-desc">支付挂号费用，获取预约凭证，按时就诊</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import BottomNavigation from '@/components/BottomNavigation.vue';
import TopHeader from '@/components/TopHeader.vue';
</script>

<style scoped>
/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
}

.home-container {
  width: 100%;
  overflow: hidden;
  padding-bottom: 6px; /* 底部间距 */
  padding-top: 55px; /* 新增：顶部间距，根据需要调整 */
}

/* Banner区域样式 */
.banner {
  width: 100%;
  background: linear-gradient(135deg, #165DFF 0%, #4080FF 100%);
  color: #fff;
  padding: 80px 40px;
  position: relative;
  overflow: hidden;
}

/* 以下样式保持不变... */
.banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' fill='rgba(255,255,255,0.1)'%3E%3Cpath d='M0,192L48,181.3C96,171,192,149,288,149.3C384,149,480,171,576,181.3C672,192,768,192,864,186.7C960,181,1056,171,1152,165.3C1248,160,1344,160,1392,160L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
  background-size: cover;
  opacity: 0.3;
}

.banner-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.banner-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.banner-desc {
  font-size: 18px;
  margin-bottom: 40px;
  line-height: 1.6;
  max-width: 600px;
  color: rgba(255, 255, 255, 0.9);
}

.banner-btns {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 160px;
}

.btn-icon {
  margin-right: 10px;
  font-size: 18px;
}

.primary-btn {
  background-color: #fff;
  color: #165DFF;
}

.primary-btn:hover {
  background-color: #e6f0ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.secondary-btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.secondary-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* 步骤区域样式 */
.steps-section {
  width: 100%;
  margin: 0;
  padding: 80px 40px;
  text-align: center;
  background-color: #f8fafc;
}

.steps-title {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
}

.steps-desc {
  font-size: 16px;
  color: #666;
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.steps-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.step-item {
  background-color: #fff;
  border: none;
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.step-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #165DFF;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.step-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.step-item:hover::before {
  transform: scaleX(1);
}

.step-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  color: #165DFF;
  background-color: rgba(22, 93, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.step-item:hover .step-icon {
  background-color: rgba(22, 93, 255, 0.2);
  transform: scale(1.1);
}

.step-icon svg {
  width: 32px;
  height: 32px;
}

.step-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  text-align: center;
}

/* 响应式布局 */
@media (max-width: 1024px) {
  .steps-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .banner {
    padding: 60px 20px;
  }
  
  .banner-title {
    font-size: 32px;
  }
  
  .banner-desc {
    font-size: 16px;
  }
  
  .steps-section {
    padding: 60px 20px;
  }
  
  .steps-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .step-item {
    padding: 30px 20px
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
  }
}
</style>